import React, { Component} from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    Image,
    View,
    TextInput,
    Alert,
    FlatList,
    TouchableWithoutFeedback,
} from 'react-native';
import pxToDp from '../config/pxToDp';
import EvilIcons from 'react-native-vector-icons/EvilIcons';

export default class FriendListHeader extends Component{

    render(){
        return(
            <View style={styles.div} >
                <TouchableWithoutFeedback onPress={this.props.search}>
                    <View style={styles.pageStyle}>
                        <View style={styles.testext}>
                            <EvilIcons name="search" size={20}></EvilIcons>
                            <Text >搜索</Text>
                        </View>

                    </View>
                </TouchableWithoutFeedback>
                <TouchableWithoutFeedback onPress={this.props.myGroupChat} >
                    <View style={styles.itemView}>
                        <Image style={styles.imgLogo} source={require('../imgs/group.png')} />
                        <Text style={{ marginLeft: 5, fontSize: 15, color: '#333' }}>
                            我的群组
                        </Text>
                    </View>
                </TouchableWithoutFeedback>
            </View >
        )
    }
}
const styles = {
    div: {
        // flex: 1,
        width: pxToDp(640),
        // flexDirection: 'row',
        paddingTop: 10,
        paddingLeft: 10,
        paddingRight: 10,
    },
    pageStyle: {
        backgroundColor:'#f3f3f3',
        height:30,
        borderRadius:5,
    },
    testext:{
        flex: 1,
        flexDirection: 'row',
        alignItems:'center',
        justifyContent: 'center',
        // color:"#f0f0f0"
    },

    itemView: {
        backgroundColor: '#fff',
        flexDirection: 'row',
        padding: 10,
        alignItems: 'center',
        height: 50
    },
    imgLogo: {
        // marginLeft: 8,
        // marginRight: 5,
        height: 40,
        borderWidth: 1,
        borderBottomLeftRadius: pxToDp(70),
        borderTopLeftRadius: pxToDp(70),
        borderBottomRightRadius: pxToDp(70),
        borderTopRightRadius: pxToDp(70),
        width: pxToDp(65),
    },
}